﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="Billing.aspx.cs" Inherits="BillingManagment.Billing" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Styles/Calender.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.ui.core.js" type="text/javascript"></script>
    <script src="Scripts/jquery.ui.datepicker.js" type="text/javascript"></script>
    <script src="Scripts/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 100px;
        }
        .style3
        {
            width: 123px;
        }
    </style>
    <script type="text/javascript">
        function printform() {
            var printContent = document.getElementById('<%=pnl_print.ClientID %>');
            var windowUrl = 'about:blank';
            var windowName = 'Print-AddressBook';
            var printWindow = window.open(windowUrl, '', 'left=300,top=500');
            printWindow.document.write(printContent.innerHTML);
            printWindow.document.close();
            printWindow.focus();
            printWindow.print();
            printWindow.close();
            return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="pnl_print" runat="server">
        <table class="style1">
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td colspan="3">
                    <h1 style="text-align: center;">
                        <b>Seller Slip</b></h1>
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <%--<asp:DropDownList ID="ddlFarmerList" runat="server">
                </asp:DropDownList>--%>
                    <asp:TextBox ID="txtFarmer" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    <asp:TextBox ID="txtDate" Enabled="false" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <asp:Label ID="lblPrevious" runat="server" Text="Previous"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtPrevious" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    <asp:Label ID="lblSold" runat="server" Text="Sold"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtSold" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <asp:Label ID="lblBucket" runat="server" Text="No Of Bucket"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtBucket" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    <asp:Label ID="lblReturn" runat="server" Text="Return"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtReturn" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <asp:Label ID="lblRemaining" runat="server" Text="Remaining"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtRemaining" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="6">
                    <asp:GridView ID="GridView1" AutoGenerateColumns="false" runat="server" Width="751px">
                        <Columns>
                            <asp:TemplateField ItemStyle-Width="30px" HeaderText="S.No">
                                <ItemTemplate>
                                    <%# Container.DataItemIndex + 1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ItemStyle-Width="30px" HeaderText="Product">
                                <ItemTemplate>
                                    <asp:Label ID="lblProduct" runat="server" Text='<%# Eval("Product_Name")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ItemStyle-Width="100px" HeaderText="No Of Bucket">
                                <ItemTemplate>
                                    <asp:Label ID="lblBucket" runat="server" Text='<%# Eval("NoOfBucket")%>'></asp:Label>
                                </ItemTemplate>
                                <%--  <EditItemTemplate>
                                <asp:TextBox ID="txtBucket" runat="server" Text='<%# Eval("ContactName")%>'></asp:TextBox>
                            </EditItemTemplate>
                            <FooterTemplate>
                                <asp:TextBox ID="txtBucket" runat="server"></asp:TextBox>
                            </FooterTemplate>--%>
                            </asp:TemplateField>
                            <asp:TemplateField ItemStyle-Width="150px" HeaderText="Rate">
                                <ItemTemplate>
                                    <asp:Label ID="lblCompany" runat="server" Text='<%# Eval("Rate_Per_Forty")%>'></asp:Label>
                                </ItemTemplate>
                                <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtCompany" runat="server" Text='<%# Eval("CompanyName")%>'></asp:TextBox>
                            </EditItemTemplate>
                            <FooterTemplate>
                                <asp:TextBox ID="txtCompany" runat="server"></asp:TextBox>
                            </FooterTemplate>--%>
                            </asp:TemplateField>
                            <asp:TemplateField ItemStyle-Width="100px" HeaderText="Weight">
                                <ItemTemplate>
                                    <asp:Label ID="lblContactName" runat="server" Text='<%# Eval("Product_Wait")%>'></asp:Label>
                                </ItemTemplate>
                                <%-- <EditItemTemplate>
                                <asp:TextBox ID="txtContactName" runat="server" Text='<%# Eval("ContactName")%>'></asp:TextBox>
                            </EditItemTemplate>
                            <FooterTemplate>
                                <asp:TextBox ID="txtContactName" runat="server"></asp:TextBox>
                            </FooterTemplate>--%>
                            </asp:TemplateField>
                            <asp:TemplateField ItemStyle-Width="150px" HeaderText="Amount">
                                <ItemTemplate>
                                    <asp:Label ID="lblCompany" runat="server" Text='<%# Eval("Total_Amount")%>'></asp:Label>
                                </ItemTemplate>
                                <%--<EditItemTemplate>
                                <asp:TextBox ID="txtCompany" runat="server" Text='<%# Eval("CompanyName")%>'></asp:TextBox>
                            </EditItemTemplate>
                            <FooterTemplate>
                                <asp:TextBox ID="txtCompany" runat="server"></asp:TextBox>
                            </FooterTemplate>--%>
                            </asp:TemplateField>
                            <%--<asp:CommandField ShowEditButton="True" />--%>
                        </Columns>
                        <AlternatingRowStyle BackColor="#C2D69B" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                    <asp:Label ID="lblProductAmount" runat="server" Text="Product Amount"></asp:Label>
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtProductAmount" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                    <asp:Label ID="lblLabourCharge" runat="server" Text="Labour Charge"></asp:Label>
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtLabourCharge" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp; Total
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtTotal" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp; Opening Balance
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtOpeningBalance" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp; Amount Payed
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtAmountPaid" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    (<asp:Label ID="lblCash" runat="server"></asp:Label>
                    &nbsp;+
                    <asp:Label ID="lblAdvance" runat="server"></asp:Label>
                    &nbsp;+
                    <asp:Label ID="lblHydro" runat="server"></asp:Label>
                    &nbsp;+
                    <asp:Label ID="lblFraid" runat="server"></asp:Label>
                    +<asp:Label ID="lblOther" runat="server"></asp:Label>
                    )
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp; Balance Amount
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtBalanceAmount" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <%--<tr>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                    <asp:Button ID="btnPrint" runat="server" Text="Print Slip" Width="76px" />
                </td>
                <td>
                    &nbsp;
                </td>
                <td class="style3">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>--%>
        </table>
    </asp:Panel>
    <div>
        <asp:Button ID="btnPrint" OnClientClick="printform()" runat="server" Font-Bold="true" Font-Size="16px" Text="Print Slip" />
    </div>
    <script type="text/javascript">
        $(function () {
            $("#ContentPlaceHolder1_txtDate").datepicker({ dateFormat: 'dd-mm-yy' }).val();


        });
    </script>
</asp:Content>
